﻿@model SpyApp.Models.AccountModel.ChangePasswordModel

@{
    ViewBag.Title = "Change Password";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<div class="page-header">
    <h3>@ViewBag.Title</h3>
</div>

@using (Html.BeginForm())
{
    @Html.AntiForgeryToken() // chặn sử dụng ở web khác
    @Html.ValidationSummary(true) // summary error
                                  
    <div class="form-post">
        <ul>
            <li class="form-row">
                @Html.LabelFor(m => m.OldPassword, new { @class = "form-column form-label medium-2 xsmall-12" })
                <div class="form-column medium-8 xsmall-12">
                    @Html.PasswordFor(m => m.OldPassword, new { @class = "", placeholder = Html.DisplayNameFor(t => t.OldPassword) })
                    @Html.ValidationMessageFor(m => m.OldPassword)
                </div>
            </li>
            <li class="form-row">
               @Html.LabelFor(m => m.NewPassword, new { @class = "form-column form-label medium-2 xsmall-12" })
                <div class="form-column medium-8 xsmall-12">
                    @Html.PasswordFor(m => m.NewPassword, new { @class = "", placeholder = Html.DisplayNameFor(t => t.NewPassword) })
                    @Html.ValidationMessageFor(m => m.NewPassword)
                </div>
            </li>
            <li class="form-row">
                @Html.LabelFor(m => m.ConfirmNewPassword, new { @class = "form-column form-label medium-2 xsmall-12" })
                <div class="form-column medium-8 xsmall-12">
                    @Html.PasswordFor(m => m.ConfirmNewPassword, new { @class = "", placeholder = Html.DisplayNameFor(t => t.ConfirmNewPassword) })
                    @Html.ValidationMessageFor(m => m.ConfirmNewPassword)
                </div>
            </li>
            <li class="form-row">
                <div class="form-column medium-2 xsmall-12"></div>
                <div class="form-column medium-8 xsmall-12">
                    <input type="submit" value="Change password" title="Change your password" />
                </div>
            </li>
        </ul>
    </div>
}

@section Script {
    @Scripts.Render("~/bundles/jqueryval")
}